<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import {dicApi} from '@/feature/sys/infra/api/dicApi'
import CURDTable from '@/framework/components/table/CURDTable'
import SysDicTypeEnum from "@/feature/sys/infra/constants/SysDicTypeEnum";

export default {
  components: {CURDTable},
  data() {
    return {
      option: {
        requestApi: dicApi,
        dialogWidth: '600px',
        showSelection: false,
        columns: [
          {
            label: '字典类型',
            prop: 'dicType',
            searchable: true,
            span: 24,
            tagMode: false,
            required: true,
            options: SysDicTypeEnum,
            type: ColumnType.SELECT
          },
          {
            label: '字典值',
            span: 24,
            width: 'auto',
            required: true,
            renderOptions: {
              showWordLimit: true,
              maxlength: 255
            },
            rows: 5,
            type: ColumnType.TEXTAREA,
            prop: 'dicValue'
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

